import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Search from '../views/Search.vue'
import setcolumn from '../views/setcolumn.vue'
import Login from '../views/Login.vue'
import register from '../views/Register.vue'

import index from '../views/personal/index.vue'
import follow from "../views/personal/follow.vue"
import compile from '../views/personal/compile.vue'
import attention from '../views/personal/attention.vue'
import abc from '../views/text.vue'
import enshrine from '../views/personal/enshrine.vue'
import newsdetails from '../views/personal/newsdetails.vue'
import morecomment from '../views/comment/morecomment.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/Search',
    name: 'Search',
    component: Search
  },
  {
    path: '/setcolumn',
    name: 'setcolumn',
    component: setcolumn
  },

  {
    path: '/login',
    name: 'loginPage',
    component: Login
  },
  {
    path: '/register',
    name: 'register',
    component: register
  },
  {
    path: '/index',
    name: 'index',
    component: index
  },
  {
    path: '/follow',
    name: 'follow',
    component: follow
  },
  {
    path: '/compile',
    name: 'compile',
    component: compile
  },
  {
    path: '/attention',
    name: 'attention',
    component: attention
  },
  //收藏页面
  {
    path: '/enshrine',
    name: 'enshrine',
    component: enshrine
  },
  //设置几个固定关注页面
  {
    path: '/abc',
    name: 'abc',
    component: abc
  },
  //新闻详情页面
  {
    path: '/newsdetails/:id',
    name: 'newsdetails',
    component: newsdetails
  },
  {
    path: '/morecomment/:id',
    name: 'morecomment',
    component: morecomment
  },

]

const router = new VueRouter({
  routes
})

export default router
